//===================================================================================
// $$
//
// Coder: Code Milker v1.0
// 0 - upper
// 1 - lower
//===================================================================================

namespace App.Domain.Handlers {
    using System;
    using App.Data;
    using App.Domain.Contracts;
    using App.Model;

    public class GetNews {
        private readonly INewsRepository _newsRepository;

        public GetNews(INewsRepository newsRepository) {
            _newsRepository = newsRepository;
        }

        public News Execute(Guid newsId) {
            try {
                return _newsRepository.GetNews(newsId);
            }
            catch (InvalidOperationException ex) {
                throw new BusinessServicesException("UnableToRetrieveReminderExceptionMessage", ex);
            }
        }
    }
}
